<include file="header"/>
<BODY class="easyui-layout">
 <div id="main_frame" data-options="region:'center',title:'',border:false">
  <div class="easyui-tabs" id="main_frame_tab" data-options="fit:true">
    <div title="任务列表" data-options="iconCls:''">
		<table id="task_admin_list" class="easyui-datagrid"
				data-options="url:'?s=task-jsondata',striped: true,border:false,pagination:true,fit:true,toolbar:toolbar_task_admin,singleSelect:true,rownumbers:true,fitColumns:true,pageList:[20,50],onClickRow:click_row_task_admin,onLoadSuccess:task_admin_loadsuccess">
			<thead>
				<tr>
				<th data-options="field:'name',formatter:format_name" width="150"> 名称</th>
				<th data-options="field:'address',formatter:format_position" width="100"> 地点</th>
				<th data-options="field:'timestamp',formatter:format_add_time" width="100"> 建立时间</th>
				<th data-options="field:'comment',formatter:format_description" width="100"> 备注</th>
				<th data-options="field:'id',formatter:format_operation" width="50" align="center"> 操作</th>
				</tr>
			</thead>
		</table>
    </div>  </div><!-- End div main_frame_tab -->
 </div><!-- End div main_frame -->
<div id="task_win_iframe" class="easyui-window" title="新建任务" data-options="modal:true,closed:true,iconCls:'icon-app'" style="width:640px;height:400px;overflow:hidden;">
<div class="easyui-layout" data-options="fit:true">
	<div data-options="region:'south',border:false"  style="padding:5px;height:40px;text-align:right;border-top:1px solid #CCC;">		
		<a class="easyui-linkbutton" data-options="iconCls:'icon-confirm'" href="javascript:void(0)" onclick="javascript:return task_form_submit();">确定</a>
		<a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="javascript:$('#task_win_iframe').window('close');">取消</a>
	</div>
	
	<div data-options="region:'center',border:false" style="padding:20px;">
		<form name="task_form" id="task_form_cid" method="post">
			<div class="sys-msg-info"></div>
			<div class="css_config">
			<table>
			<tr id="conftr_0">
				<td class="label_grp"> </td>
				<td class="css_content"></td>
			</tr>
			<tbody id="group_1">
			  <tr id="conftr_name">
				<td class="label_1" style="width:100px;">名 称</td>
				<td class="css_content"><span class="input_margin"><input type="text" name="name" id="name_cid" value="" class="long" style="width:300px;"></span>		</td>
			</tr>
			  <tr id="conftr_address">
				<td class="label_1">地点</td>
				<td class="css_content"><span class="input_margin"><textarea name="address" id="address_cid" style="width:300px;height:100px;"></textarea></span>		</td>
			</tr>
			<tr id="conftr_comment">
				<td class="label_1">备注</td>
				<td class="css_content"><span class="input_margin"><textarea name="comment" id="comment_cid" style="width:300px;height:100px;"></textarea></span>		</td>
			</tr>
			</tbody><!-- End group group_1 -->
			 </table>
			</div><!-- End css_conf -->
		<input type="hidden" name="id" id="mod_url_hid" value="$param[url_id]">
		<input type="hidden" name="policy_id" value="$param[id]">
		<input type="hidden" name="submit_post" value="sec_policy_url_mod_submit">
		</form>
	</div>
</div>
</div>

<SCRIPT LANGUAGE="JavaScript">
<!--
/*Tab link*/
var toolbar_task_admin = [{id:'btn_add',text:'新建任务',iconCls:'icon-add',handler:but_add_handle},{id:'btn_export',text:'任务导出',iconCls:'icon-export',handler:but_delete_handle},{id:'btn_import',text:'任务导入',iconCls:'icon-import',handler:but_delete_handle},{id:'btn_start',text:'任务开始',iconCls:'icon-start',handler:but_delete_handle},{id:'btn_stop',text:'任务结束',iconCls:'icon-stop',handler:but_delete_handle}];

/*buttons handle*/
function but_add_handle(){ $("#task_win_iframe").window('open') }
function but_add_pos_handle(){}
function but_delete_handle(){}

/*format column*/
function format_index(value){}
function format_name(value){return value}
function format_position(value){return value}
function format_add_time(value){return value}
function format_description(value){return value}
function format_operation(value,data){return '<a href="javascript:delete_task('+data.taskid+')"><img src="../public/images/default/icons/icon_del.gif" alt="删除" title="删除"></a>'}

function click_row_task_admin(){
	
}
function task_admin_loadsuccess(){
	
}

function task_form_submit(){	
	$.ajax({
	  type: 'POST',
	  url: 'task-insert',
	  data: $("#task_form_cid").serialize(),
	  success: function(){alert()},
	  dataType: 'json'
	});
	$('#task_win_iframe').window('close');
	
	$("#task_admin_list").datagrid('reload');
}
function delete_task(tid){
	$.ajax({
	  type: 'POST',
	  url: 'task-delete-id-'+tid
	});

	$("#task_admin_list").datagrid('reload');
}
//-->
</SCRIPT>


</BODY>
</HTML> 
<!-- generate by hover ui system -->